package com.qzsoft.zhjd.machine.zhgcloud.worktime.model;

import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @ClassName ZhgWorktimeModel
 * @Description 工时数据
 * @author linhuawei
 * @since 2021-11-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
public class ZhgWorktimeModel {

    /**
     * 设备编号
     */
    private String machine_key;
    
    /**
     * 设备名称
     */
    private String machine_name;
    
    /**
     * 项目编号
     */
    private String project_scene_code;
    
    /**
     * 工作时长
     */
    private Long work_time;
    
    /**
     * 怠速时长
     */
    private Long idle_time;
    
    /**
     * 停止时长
     */
    private Long off_time;
    
    /**
     * 里程
     */
    private Long mileage;
    
    /**
     * 日期
     */
    private Date date;
    
    /**
     * 工时详情
     */
    private List<ZhgWorktimeRecordsModel> work_records;

    public boolean isValid() {
        return null != work_time || null != idle_time || null != off_time || null != mileage;
    }

}
